package com.uzai.common.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 客服转发消息配置
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum KefuSendMsgEnum {
    ADDFRIEND("addFriend","好友添加"),
    FIRSTQUERY("firstQuery","首次查券(老)"),
    FIRSTQUERYREWARD("firstQueryReward","首次查券奖励(老)"),
    QUERYSUCCESS("querySuccess","查券成功"),
    QUERYERROR("queryError","查券异常"),
    FIRSTORDER("firstOrder","首次下单"),
    FIRSTORDERREWARD("firstOrderReward","首次下单奖励(老)"),
    ORDERSUCCESS("orderSuccess","下单成功"),
    ORDERINVALID("orderInvalid","订单失效"),
    ORDERREFUND("orderRefund","订单维权"),
    ORDERBINDERROR("orderBindError","订单绑定失败"),
    NOTPROMOT("notPromot","未参加推广"),
    FIRSTTAKEBAL("firstTakeBal","首次提现(老)"),
    TAKEBALSUCCESS("takeBalSuccess","提现成功"),
    TAKEBALERROR("takeBalError","提现失败"),
    TAKEBALCHECK("takeBalCheck","提现审核"),
    SIGNINSUCCESS("signInSuccess","签到成功"),
    SIGNINERROR("signInError","签到失败"),
    SHOPPINGGUIDE("shoppingGuide","导购"),

    MDEXCHANGE("mdExchange","兑换免单"),
    CALLKEFU("callKefu","呼叫客服"),

    SUPERCMD("superCmd","超级指令"),
    OTHER_CMD("otherCmd","其他指令"),
    UNSOLICITEDMSG("unsolicitedMsg","后台主动发送的消息（单聊和群发）"),

    AIQA("aiQA","智能回复"),
    ORDERSETTLE("orderSettle","订单结算"),                //订单结算
    ORDERREWARD("orderReward","营销奖励(查券奖励、下单奖励、邀请奖励)"),   //下单奖励回复(回复上级/回复上上级/回复代理/回复合伙人)
    GUIDEPLACEORDER("guidePlaceOrder","催查券/催下单"),   //引导下单

    UNKNOWMSG("unknowMsg","系统无法识别的消息"),
    QUERYCOUPON("queryCoupon","查券(淘京拼唯抖快)"),
    REDPACKCARD("redPackCard","红包卡片"), //所有发出去的红包卡片消息


    ;

    public static final String ADDFRIEND_VALUE = "addFriend";
    public static final String FIRSTQUERY_VALUE = "firstQuery";
    public static final String FIRSTQUERYREWARD_VALUE = "firstQueryReward";
    public static final String QUERYSUCCESS_VALUE = "querySuccess";
    public static final String QUERYERROR_VALUE = "queryError";
    public static final String FIRSTORDER_VALUE = "firstOrder";
    public static final String FIRSTORDERREWARD_VALUE = "firstOrderReward";
    public static final String ORDERSUCCESS_VALUE = "orderSuccess";
    public static final String ORDERINVALID_VALUE = "orderInvalid";
    public static final String ORDERREFUND_VALUE = "orderRefund";
    public static final String ORDERBINDERROR_VALUE = "orderBindError";
    public static final String NOTPROMOT_VALUE = "notPromot";
    public static final String FIRSTTAKEBAL_VALUE = "firstTakeBal";
    public static final String TAKEBALSUCCESS_VALUE = "takeBalSuccess";
    public static final String TAKEBALERROR_VALUE = "takeBalError";
    public static final String TAKEBALCHECK_VALUE = "takeBalCheck";
    public static final String SIGNINSUCCESS_VALUE = "signInSuccess";
    public static final String SIGNINERROR_VALUE = "signInError";
    public static final String SHOPPINGGUIDE_VALUE = "shoppingGuide";
    public static final String MDEXCHANGE_VALUE = "mdExchange";
    public static final String CALLKEFU_VALUE = "callKefu";
    public static final String SUPERCMD_VALUE = "superCmd";
    public static final String OTHER_CMD_VALUE = "otherCmd";
    public static final String UNSOLICITEDMSG_VALUE = "unsolicitedMsg";
    public static final String UNKNOWMSG_VALUE = "unknowMsg";
    public static final String QUERYCOUPON_VALUE = "queryCoupon";
    public static final String AIQA_VALUE = "aiQA";
    public static final String ORDERSETTLE_VALUE = "orderSettle";
    public static final String ORDERREWARD_VALUE = "orderReward";
    public static final String GUIDEPLACEORDER_VALUE = "guidePlaceOrder";
    public static final String REDPACKCARD_VALUE = "redPackCard";
    private String key;
    private String desc;

    KefuSendMsgEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static KefuSendMsgEnum getByKey(String key) {
        if (StringUtils.isBlank(key)) {
            return null;
        }
        for (KefuSendMsgEnum type: KefuSendMsgEnum.values()) {
            if (type.getKey().equals(key)) {
                return type;
            }
        }
        return null;
    }
}
